<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> 
<html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>酒店展示页面</title>
        <meta name="description" content="GARO is a real-estate template">
        <meta name="author" content="Kimarotec">
        <meta name="keyword" content="html5, css, bootstrap, property, real-estate theme , bootstrap template">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800' rel='stylesheet' type='text/css'>

        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
        <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
        <link rel="icon" href="favicon.ico" type="image/x-icon">

       <!-- <link rel="stylesheet" href="./HotelUser/assets/css/normalize.css"> -->
         <!-- <link rel="stylesheet" href="./HotelUser/assets/css/font-awesome.min.css"> -->
        <!-- <link rel="stylesheet" href="./HotelUser/assets/css/fontello.css">
        <link href="./HotelUser/assets/fonts/icon-7-stroke/css/pe-icon-7-stroke.css" rel="stylesheet">
        <link href="./HotelUser/assets/fonts/icon-7-stroke/css/helper.css" rel="stylesheet">
        <link href="./HotelUser/assets/css/animate.css" rel="stylesheet" media="screen"> -->
        <link rel="stylesheet" href="./HotelUser/assets/css/bootstrap-select.min.css">
        <link rel="stylesheet" href="./HotelUser/bootstrap/css/bootstrap.min.css">
        <link rel="stylesheet" href="./HotelUser/assets/css/icheck.min_all.css"> 
        <link rel="stylesheet" href="./HotelUser/assets/css/price-range.css">
        <link rel="stylesheet" href="./HotelUser/assets/css/owl.carousel.css">  
        <link rel="stylesheet" href="./HotelUser/assets/css/owl.theme.css">
        <link rel="stylesheet" href="./HotelUser/assets/css/owl.transitions.css">
        <link rel="stylesheet" href="./HotelUser/assets/css/orderstyle.css">
        <link rel="stylesheet" href="./HotelUser/assets/css/style.css">
        <link rel="stylesheet" href="./HotelUser/assets/css/responsive.css">
    </head>
    <body>

        <div id="preloader">
            <div id="status">&nbsp;</div>
        </div>
        <!-- Body content -->
    
       
        <div class="header-connect">
            <div class="container">
                <div class="row">
                    <div class="col-md-5 col-sm-8  col-xs-12">
                        <div class="header-half header-call">
                            <p>
                                <span><i class="pe-7s-call"></i> +1 234 567 7890</span>
                                <span><i class="pe-7s-mail"></i> your@company.com</span>
                            </p>
                        </div>
                    </div>
                    <div class="col-md-2 col-md-offset-5  col-sm-3 col-sm-offset-1  col-xs-12">
                        <div class="header-half header-social">
                            <ul class="list-inline">
                                <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                                <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                                <li><a href="#"><i class="fa fa-vine"></i></a></li>
                                <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                                <li><a href="#"><i class="fa fa-dribbble"></i></a></li>
                                <li><a href="#"><i class="fa fa-instagram"></i></a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>       
        <!--End top header -->

        <nav class="navbar navbar-default ">
            <div class="container">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navigation">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="index.html"><img src="./HotelUser/assets/img/logo.png" alt=""></a>
                </div>

                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse yamm" id="navigation">
                    <div class="button navbar-right" id="login">
                        <!-- <button class="navbar-btn nav-button wow bounceInRight login" onclick=" window.open('register.html')" data-wow-delay="0.4s">Login</button>
                        <button class="navbar-btn nav-button wow fadeInRight" onclick=" window.open('submit-property.html')" data-wow-delay="0.5s">Submit</button> -->
                    </div>
                    <ul class="main-nav nav navbar-nav navbar-right">
                        <li class="dropdown ymm-sw " data-wow-delay="0.1s">
                            <a href="index.html" class="dropdown-toggle active" data-toggle="dropdown" data-hover="dropdown" data-delay="200">个人中心</a>
                            <!-- <ul class="dropdown-menu navbar-nav">
                                <li>
                                    <a href="index-2.html">Home Style 2</a>
                                </li>
                                <li>
                                    <a href="index-3.html">Home Style 3</a>
                                </li>
                                <li>
                                    <a href="index-4.html">Home Style 4</a>
                                </li>
                                <li>
                                    <a href="index-5.html">Home Style 5</a>
                                </li>
                            </ul> -->
                        </li>

                        <li class="wow fadeInDown" data-wow-delay="0.1s"><a class="dropdown-toggle" href="./HotelUser-hotel.html">预订酒店</a></li>
                        <li class="wow fadeInDown" data-wow-delay="0.1s"><a class="" href="./HotelUser-shop.html">精品商城</a></li>
                        <li class="dropdown yamm-fw" data-wow-delay="0.1s">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="200">点餐堂食 <b class="caret"></b></a>
                            
                        </li>

                        <!-- <li class="wow fadeInDown" data-wow-delay="0.4s"><a href="contact.html">尊享服务</a></li> -->
                    </ul>
                </div><!-- /.navbar-collapse -->
            </div><!-- /.container-fluid -->
        </nav>
        <!-- End of nav bar -->
        <div class="page-head"> 
            <div class="container">
                <div class="row">
                    <div class="page-head-content">
                        <h1 class="page-title">凤嘉昶客栈</h1>               
                    </div>
                </div>
            </div>
        </div>
<!-- xiaomi -->
<body>
	<!-- start header -->

	<!--end header -->
	<!-- start banner_x -->
		<div class="banner_x center">
			<!-- <a href="./index.html" target="_blank"><div class="logo fl"></div></a>
			<a href=""><div class="ad_top fl"></div></a>
			<div class="nav fl">
				<ul>
					<li><a href="">小米手机</a></li>
					<li><a href="">红米</a></li>
					<li><a href="">平板·笔记本</a></li>
					<li><a href="">电视</a></li>
					<li><a href="">盒子·影音</a></li>
					<li><a href="">路由器</a></li>
					<li><a href="">智能硬件</a></li>
					<li><a href="">服务</a></li>
					<li><a href="">社区</a></li>
				</ul>
			</div> -->
			<!-- <div class="search fr">
				<form action="" method="post">
					<div class="text fl">
						<input type="text" class="shuru"  placeholder="小米6&nbsp;小米MIX现货">
					</div>
					<div class="submit fl">
						<input type="submit" class="sousuo" value="搜索"/>
					</div>
					<div class="clear"></div>
				</form>
				<div class="clear"></div>
			</div> -->
		</div>
<!-- end banner_x -->
<!-- self_info -->
	<div class="grzxbj" style="float: left; text-align: center;">
		<div class="selfinfo center">
		<div class="lfnav fl" >
			<div class="ddzx" style="text-align: left;">我的订单</div>
			<div class="subddzx">
				<ul>
					<li><a id="order1" style="color: red;" href="javascript:order(1)" >酒店订单</a></li>
					<li><a id="order2" href="javascript:order(2)" >商品订单</a></li>
					<li><a id="order3" href="javascript:order(3)" style="display: none;" >餐品订单</a></li>
					<!-- <li><a href="">评价晒单</a></li> -->
				</ul>
			</div>
			<div class="ddzx" style="text-align: left;">个人中心</div>
			<div class="subddzx">
				<ul>
					<li><a href="javascript:self();" id="self">我的个人信息</a></li>
					<!-- <li><a href="">消息通知</a></li>
					<li><a href="">优惠券</a></li> -->
					<!-- <li><a href="">收货地址</a></li> -->
				</ul>
			</div>
		</div>

		<div class="rtcont fr" id="hotelorder">
			<!-- <div class="ddzxbt" >交易订单</div>
			<div class="ddxq" id="orders"> -->
				<!-- <div class="ddspt fl"><img src="./image/gwc_xiaomi6.jpg" alt=""></div>
				<div class="ddbh fl">订单号:1705205643098724</div>
				<div class="ztxx fr">
					<ul>
						<li>已发货</li>
						<li>￥2499.00</li>
						<li>2017/05/20 13:30</li>
						<li><a href="">订单详情></a></li>
						<div class="clear"></div>
					</ul>
				</div>
				<div class="clear"></div> -->
			<!-- </div> -->
			<!-- <div class="ddxq">
				<div class="ddspt fl"><img src="./image/liebiao_hongmin4_dd.jpg" alt=""></div>
				<div class="ddbh fl">订单号:170526435444865</div>
				<div class="ztxx fr">
					<ul>
						<li>已发货</li>
						<li>￥1999.00</li>
						<li>2017/05/26 14:02</li>
						<li><a href="">订单详情></a></li>
						<div class="clear"></div>
					</ul>
				</div>
				<div class="clear"></div>
			</div> -->
		</div>
		<div class="clear"></div>
		</div>
	</div>
<!-- self_info -->
		
		
        <script src="./HotelUser/assets/js/modernizr-2.6.2.min.js"></script>
        <script src="./HotelUser/assets/js/jquery-1.10.2.min.js"></script>
        <script src="./HotelUser/bootstrap/js/bootstrap.min.js"></script>
        <script src="./HotelUser/assets/js/bootstrap-select.min.js"></script>
        <script src="./HotelUser/assets/js/bootstrap-hover-dropdown.js"></script>
        <script src="./HotelUser/assets/js/easypiechart.min.js"></script>
        <script src="./HotelUser/assets/js/jquery.easypiechart.min.js"></script>
        <script src="./HotelUser/assets/js/owl.carousel.min.js"></script>
        <script src="./HotelUser/assets/js/wow.js"></script>
        <script src="./HotelUser/assets/js/icheck.min.js"></script>
        <script src="./HotelUser/assets/js/price-range.js"></script>
        <script src="./HotelUser/assets/js/main.js"></script>
        <script src="./json-test/hotel.js"></script>   
        <script>
var user=JSON.parse(localStorage.getItem('nowuser'))
console.log("user=",user)

if(user==null){
  window.location.href='./index.html'
}
else{
  var l=''

  l+="<button class='navbar-btn nav-button wow fadeInRight' onclick='bye();'>退出</button>"
  document.getElementById('login').innerHTML=l;
}
function bye(){
  alert("退出咯")
  window.location.href='./index.html',
  localStorage.clear;
}
function self(){
  if(user.gender==1){
    var gender='男'
  }
  else{
   var gender='女'; 
  }
 
  let mess='';
  mess+=
    "<div class='grzlbt ml40'>我的资料</div>"+
    "<div class='subgrzl ml40'><span>账号</span><span>"+user.account+"</span></div>"+
    "<div class='subgrzl ml40'><span>手机号</span><span>"+user.phone+"</span></div>"+
    "<div class='subgrzl ml40'><span>密码</span><span>"+user.password+"</span></div>"+
    "<div class='subgrzl ml40'><span style='width:100px'>身份证号</span><span>"+user.idNumber+"</span></div>"+
    "<div class='subgrzl ml40'><span>年龄</span><span>"+user.age+"</span></div>"+
    "<div class='subgrzl ml40'><span>性别</span><span>"+gender+"</span></div>"+
    "<div class='subgrzl ml40'><span>会员积分</span><span>"+gender+"</span></div>"+
    "<div class='subgrzl ml40' onclick='edit();'><span><a href='#'>编辑</a></span></div>"

  document.getElementById('order1').style.color="black"
    document.getElementById('order2').style.color="black"
    document.getElementById('order3').style.color="black"
    document.getElementById('self').style.color="red"
    document.getElementById('hotelorder').innerHTML=mess

}
function disorder(){
  alert("我要退订了")
}
function edit(){
  alert("要去修改信息了")
  localStorage.setItem('editUser',JSON.stringify(user))
  window.location.href='./HotelUser-edit.html'
}
var m=''


$.ajax({
            url: "https://douzi.wiki:7000/GROW/api/goods/checkGoodsOrder",
            type: "get",
          dataType: "json",
          contentType: "application/json",
            success: function (res) {
m="<div class='ddzxbt' >交易订单</div>"+
	"<div class='ddxq' id='orders'>"+
"</div>"
document.getElementById('hotelorder').innerHTML=m

              if (res.code == 0) {
                // alert("查看成功");
                var h=''
                  $.each(res.data,function(i,n){
                    // alert("查看成功");
                    // if(usr.id==n.cui){}
   h+="<div class='ddspt fl'><img src='./image/gwc_xiaomi6.jpg' alt=''></div>"+
            "<div class='ddbh fl' style='width:100px;'>订单号:"+n.goi+"</div>"+
            "<div class='ztxx fr'>"+
                "<ul>"+
                    // "<li>已发货</li>"+
                    "<li style='width:200px;'>￥"+n.gn+"</li>"+
                    "<li>数量："+n.cn+"</li>"+
                    "<li>单价："+n.gocp/n.cn+"元</li>"+
                    "<li>总价："+n.gocp+"元</li>"+
                    // "<li><a href='javascript:disorder();'>退订></a>"+"</li>"+
                    "<div class='clear'></div>"+
                 "<ul>"+
                "<ul>"+
                  
                  "<ul>"+
            "</div>"+
            "<div>"+
              "<li><a href='javascript:disorder();'>退订</a>"+"</li>"+
              "</div>"+
            "<div class='clear'></div>"
  });  
  // alert(h)
                   document.getElementById('order1').style.color="black"
    document.getElementById('order2').style.color="red"
    document.getElementById('order3').style.color="black"
    document.getElementById('orders').innerHTML=h
              } else {
                alert("查看失败");
              }
            },
            error: function (res) {},
          });
 
            function order(ina){ 
              m="<div class='ddzxbt' >交易订单</div>"+
	"<div class='ddxq' id='orders'>"+
"</div>"
document.getElementById('hotelorder').innerHTML=m
                 let h=''
              if(ina==1){
                $.ajax({
            url: "https://douzi.wiki:7000/GROW/api/roomOrder/?page=0&limit=0",
            type: "get",
          dataType: "json",
          contentType: "application/json",
            success: function (res) {

      if (res.code == 0) {
                // alert("查看成功");
                  $.each(res.data,function(i,n){
                    // if(usr.id==n.t_user_id){
   h+="<div class='ddspt fl'><img src='./image/gwc_xiaomi6.jpg' alt=''></div>"+
    "<div class='ddbh fl' style='width:150px;'>订单号:"+n.id+"</div>"+
    "<div class='ztxx fr'>"+
        "<ul>"+
            // "<li>已发货</li>"+
            "<li style='width:200px;'>"+n.gn+"</li>"+
            "<li>房间号："+n.troomId+"</li>"+
            "<li>支付金额："+(n.price*n.days)+"元</li>"+
            "<li>日价："+n.price+"元</li>"+
     
            "<div class='clear'></div>"+
        "</ul>"+
    "</div>"+
    "<div>"+
              "<li><a href='javascript:disorder();'>退订</a>"+"</li>"+
              "</div>"+
    "<div class='clear'></div>"
    // h='456'
//  }
});  
                   document.getElementById('order1').style.color="red"
    document.getElementById('order2').style.color="black"
    document.getElementById('order3').style.color="black"
    document.getElementById('self').style.color="black"
    document.getElementById('orders').innerHTML=h
              } else {
                alert("查看失败");
              }
            },
            error: function (res) {},
          });
    //           
              }
              else if(ina==2){

                $.ajax({
            url: "https://douzi.wiki:7000/GROW/api/goods/checkGoodsOrder",
            type: "get",
          dataType: "json",
          contentType: "application/json",
            success: function (res) {

              if (res.code == 0) {
                // alert("查看成功");

                  $.each(res.data,function(i,n){

                    // if(usr.id==n.cui){}
   h+=    "<div class='ddspt fl'><img src='./image/gwc_xiaomi6.jpg' alt=''></div>"+
    "<div class='ddbh fl' style='width:100px;'>订单号:"+n.goi+"</div>"+
    "<div class='ztxx fr'>"+
        "<ul>"+
            // "<li>已发货</li>"+
            "<li style='width:200px;'>"+n.gn+"</li>"+
            "<li>数量："+n.cn+"</li>"+
            "<li>单价："+n.gocp/n.cn+"元</li>"+
            "<li>总价："+n.gocp+"元</li>"+
            "<div class='clear'></div>"+
        "</ul>"+
    "</div>"+
    "<div>"+
              "</div>"+
              "<div>"+
              // "<li><a href='javascript:disorder();'>退订</a>"+"</li>"+
              "</div>"+
    "<div class='clear'></div>"
    // h='456'
 
                  });  
    document.getElementById('order1').style.color="black"
    document.getElementById('order2').style.color="red"
    document.getElementById('order3').style.color="black"
    document.getElementById('self').style.color="black"
    document.getElementById('orders').innerHTML=h
              } else {
                alert("查看失败");
              }
            },
            error: function (res) {},
          });

              }
//               else if(ina==3){
                
//                 $.ajax({
//             url: "https://douzi.wiki:7000/GROW/api/goods/checkGoodsOrder",
//             type: "get",
//           dataType: "json",
//           contentType: "application/json",
//             success: function (res) {

//               if (res.code == 0) {
//                 // alert("查看成功");

//                   $.each(res.data,function(i,n){

//                     // if(usr.id==n.cui){}
//    h+=    "<div class='ddspt fl'><img src='./image/gwc_xiaomi6.jpg' alt=''></div>"+
//     "<div class='ddbh fl' style='width:100px;'>订单号:"+n.goi+"</div>"+
//     "<div class='ztxx fr'>"+
//         "<ul>"+
//             // "<li>已发货</li>"+
//             "<li style='width:200px;'>"+n.gn+"</li>"+
//             "<li>数量："+n.cn+"</li>"+
//             "<li>单价："+n.gocp/n.cn+"元</li>"+
//             "<li>总价："+n.gocp+"元</li>"+
//             "<div class='clear'></div>"+
//         "</ul>"+
//     "</div>"+
//     "<div>"+
//               "<li><a href='javascript:disorder();'>退订</a>"+"</li>"+
//               "</div>"+
//     "<div class='clear'></div>"
//     // h='456'
 
//                   });  
// document.getElementById('order1').style.color="black"
//     document.getElementById('order2').style.color="black"
//     document.getElementById('order3').style.color="red"
//     document.getElementById('self').style.color="black"
//     document.getElementById('orders').innerHTML=h
                
//               } else {
//                 alert("查看失败");
//               }
//             },
//             error: function (res) {},
//           });
//                     //             h+=    "<div class='ddspt fl'><img src='./image/gwc_xiaomi6.jpg' alt=''></div>"+
//     // "<div class='ddbh fl'>订单号:1705205643098724</div>"+
//     // "<div class='ztxx fr'>"+
//     //     "<ul>"+
//     //         "<li>已发货</li>"+
//     //         "<li>￥2499.00</li>"+
//     //         "<li>2017/05/20 13:30</li>"+
//     //         "<li><a href=''>订单详情></a>"+"</li>"+
//     //         "<div class='clear'></div>"+
//     //     "</ul>"+
//     // "</div>"+
//     // "<div class='clear'></div>"

//               }
            }
        </script>
    </body>
</html>